<!DOCTYPE html>
<html lang="en">
  <head>
    <title>OCRManager Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
    <script src="../js/lunr.min.js" defer></script>
    <script src="../js/typeahead.jquery.js" defer></script>
    <script src="../js/jazzy.search.js" defer></script>
  </head>
  <body>
    <a name="//apple_ref/objc/Class/OCRManager" class="dashAnchor"></a>
    <a title="OCRManager Class Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">esand_ocr 1.0.0 Docs</a> (41% documented)</p>
        <p class="header-right">
          <form role="search" action="../search.json">
            <input type="text" placeholder="Search documentation" data-typeahead>
          </form>
        </p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">esand_ocr Reference</a>
        <img id="carat" src="../img/carat.png" />
        OCRManager Class Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/OCRManager.html">OCRManager</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Type%20Definitions.html">Type Definitions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Type%20Definitions.html#/c:OCRManager.h@T@OCRCallback">OCRCallback</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>OCRManager</h1>
              <div class="declaration">
                <div class="language">
                  
                  <pre class="highlight objective_c"><code><span class="k">@interface</span> <span class="nc">OCRManager</span> <span class="p">:</span> <span class="nc">NSObject</span></code></pre>

                </div>
              </div>
            <p>OCR 管理类</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OCRManager(im)initWithViewController:"></a>
                    <a name="//apple_ref/objc/Method/-initWithViewController:" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OCRManager(im)initWithViewController:">-initWithViewController:<wbr></a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>初始化函数</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">id</span><span class="p">)</span><span class="nf">initWithViewController</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">UIViewController</span> <span class="o">*</span><span class="p">)</span><span class="nv">vc</span><span class="p">;</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OCRManager(im)processOcr:token:from:ocrCallBack:"></a>
                    <a name="//apple_ref/objc/Method/-processOcr:token:from:ocrCallBack:" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OCRManager(im)processOcr:token:from:ocrCallBack:">-processOcr:<wbr>token:<wbr>from:<wbr>ocrCallBack:<wbr></a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>执行OCR操作</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nf">processOcr</span><span class="p">:(</span><span class="kt">int</span><span class="p">)</span><span class="nv">ocrType</span>
             <span class="nf">token</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">token</span>
              <span class="nf">from</span><span class="p">:(</span><span class="kt">int</span><span class="p">)</span><span class="nv">from</span>
       <span class="nf">ocrCallBack</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Type%20Definitions.html#/c:OCRManager.h@T@OCRCallback">OCRCallback</a></span><span class="p">)</span><span class="nv">ocrCallBack</span><span class="p">;</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>ocrType</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>OCR类型，0：身份证正面，1：身份证背面，666: 不做识别，只返回照片 (token传入nil即可)</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>token</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>初始化拿到的token字符串</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>from</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>0: 从相机拍摄，1：从相册获取</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>ocrCallBack</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>执行结果回调</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:objc(cs)OCRManager(cm)getSDKVersion"></a>
                    <a name="//apple_ref/objc/Method/+getSDKVersion" class="dashAnchor"></a>
                    <a class="token" href="#/c:objc(cs)OCRManager(cm)getSDKVersion">+getSDKVersion</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>获取 SDK 版本</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Objective-C</p>
                          <pre class="highlight objective_c"><code><span class="k">+</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="n">getSDKVersion</span><span class="p">;</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Return Value</h4>
                        <p>SDK版本号</p>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2023 <a class="link" href="http://www.esandinfo.com" target="_blank" rel="external">Reid.Lee</a>. All rights reserved. (Last updated: 2023-12-13)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.5</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
